CREATE TABLE [dbo].[TDCALI_DOCP]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_CALI] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CO_ORDE_SERV] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[NU_ANNO] [int] NOT NULL CONSTRAINT [DF__TDCALI_DO__NU_AN__2C538F61] DEFAULT ((0)),
[NU_MESE] [int] NOT NULL CONSTRAINT [DF__TDCALI_DO__NU_ME__2D47B39A] DEFAULT ((0)),
[CO_MONE] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[IM_TOTA] [numeric] (16, 4) NULL CONSTRAINT [DF__TDCALI_DO__IM_TO__2E3BD7D3] DEFAULT ((0)),
[CO_USUA_CREA] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF__TDCALI_DO__CO_US__2F2FFC0C] DEFAULT (suser_sname()),
[FE_USUA_CREA] [datetime] NULL CONSTRAINT [DF__TDCALI_DO__FE_US__30242045] DEFAULT (getdate()),
[CO_USUA_MODI] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF__TDCALI_DO__CO_US__3118447E] DEFAULT (suser_sname()),
[FE_USUA_MODI] [datetime] NULL CONSTRAINT [DF__TDCALI_DO__FE_US__320C68B7] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCALI_DOCP] ADD CONSTRAINT [PK__TDCALI_D__F2EF01E104908221] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_CALI], [CO_ORDE_SERV], [NU_ANNO], [NU_MESE]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCALI_DOCP] ADD CONSTRAINT [FK__TDCALI_DO__CO_EM__2F65D18D] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
